<template>
  <button @click="onClick1">A</button>

  <button @click="onCtrlClick">A</button>

  <button @click="onClick2">A</button>
</template>

<script setup>
import { onMounted, onUnmounted } from 'vue';

const handleKeyDown = (event) => {
  if (event.altKey && event.shiftKey) {
    onClick1();
  } else if (event.shiftKey) {
    onCtrlClick();
  } else {
    onClick2();
  }
};

onMounted(() => {
  window.addEventListener('keydown', handleKeyDown);
});

onUnmounted(() => {
  window.removeEventListener('keydown', handleKeyDown);
});

function onClick1() {
  console.log('onClick1');
}

function onCtrlClick() {
  console.log('onCtrlClick');
}

function onClick2() {
  console.log('onClick2');
}
</script>